package com.gzk.feignClients;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class StoreFeignFallbackFactory implements FallbackFactory<StoreFeign>{
    @Override
    public StoreFeign create(Throwable throwable) {
        return new StoreFeign() {
            @Override
            public Integer reduceStore(Map<String, Long> map) {
                return -1;
            }
        };
    }
}
